package com.example.quartztest.Job;

import com.example.quartztest.entity.mgs;
import com.example.quartztest.service.MsgRequest;
import com.example.quartztest.service.quazrtDemo;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Date;

/**
 * @Author: zhaojie
 * @Date: Created in 15:22 2018/5/2
 * @Description:
 * @Modified By:
 */
public class HelloJob implements BaseJob {
    private static Logger log = LoggerFactory.getLogger(HelloJob.class);

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {
        System.out.println("发送短信");
        mgs mg=new mgs();
        mg.setTelphone("17521137390");
        mg.setContent("{\"name\":\"赵捷\",\"code\":\"123456\"}");
        mg.setSignName("赵捷");
        MsgRequest msgRequest=new MsgRequest();
        msgRequest.SendRequest(mg);
        quazrtDemo demo=new quazrtDemo();
        demo.sendMgs();
        log.error("hellow执行时间：" + new Date());
    }

    public HelloJob() {

    }
}
